/**
 * Created with WebStorm.
 * @Author: panda
 * @Date: 2022-05-18 09:25
 * @Description: 历史接口
 */
import {createRequestClient} from './axios/request';
import {APISchema} from "@/api/axios/type";

interface Result {
  id: string | number,
  title: string,
  thumbnail: string,
  remainTime: string,
  timestamp: string,
  author: string
}

interface HistorySchema extends APISchema {
  historyList: {
    request: {
      pageNum: number, pageSize: number
    };
    response: {
      code: number,
      msg: string,
      data:  Array<Result>
    };
  };


}

export const historyApi = createRequestClient<HistorySchema>({
  baseURL: '',
  apis: {
    // 为了使用mock数据，先使用post，以后改回get
    historyList: 'POST /history',
  }
});
